package com.team7.home.controller;

import com.team7.common.vo.ArticleVo;
import com.team7.common.vo.CommonResult;
import com.team7.home.service.ArticleService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: team7-object-master
 * @description:
 * @author: 王金涛
 * @create: 2021-10-19 17:44
 **/
@RestController
@RequestMapping("/home/article")
public class ArticleController {
    @Resource
    private ArticleService articleService;

    @PostMapping("/getArticleByNavId")
    public CommonResult getArticleByNavId(@RequestBody ArticleVo articleVo){
        return articleService.getArticleByNavId(articleVo.getNavId());
    }

    @PostMapping("/updateArticleByNavId")
    public CommonResult updateArticleByNavId(@RequestBody ArticleVo articleVo){
        return articleService.updateArticleByNavId(articleVo);
    }


}

